package com.xydtech.ecard.config.service.impl;

import java.util.List;
import com.xydtech.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xydtech.ecard.config.mapper.EcardPosterMakeListMapper;
import com.xydtech.ecard.config.domain.EcardPosterMakeList;
import com.xydtech.ecard.config.service.IEcardPosterMakeListService;
import com.xydtech.common.core.text.Convert;

/**
 * 自制海报记录Service业务层处理
 * 
 * @author xydtech
 * @date 2022-12-05
 */
@Service
public class EcardPosterMakeListServiceImpl implements IEcardPosterMakeListService 
{
    @Autowired
    private EcardPosterMakeListMapper ecardPosterMakeListMapper;

    /**
     * 查询自制海报记录
     * 
     * @param id 自制海报记录主键
     * @return 自制海报记录
     */
    @Override
    public EcardPosterMakeList selectEcardPosterMakeListById(Long id)
    {
        return ecardPosterMakeListMapper.selectEcardPosterMakeListById(id);
    }

    /**
     * 查询自制海报记录列表
     * 
     * @param ecardPosterMakeList 自制海报记录
     * @return 自制海报记录
     */
    @Override
    public List<EcardPosterMakeList> selectEcardPosterMakeListList(EcardPosterMakeList ecardPosterMakeList)
    {
        return ecardPosterMakeListMapper.selectEcardPosterMakeListList(ecardPosterMakeList);
    }

    /**
     * 新增自制海报记录
     * 
     * @param ecardPosterMakeList 自制海报记录
     * @return 结果
     */
    @Override
    public int insertEcardPosterMakeList(EcardPosterMakeList ecardPosterMakeList)
    {
        ecardPosterMakeList.setCreateTime(DateUtils.getNowDate());
        return ecardPosterMakeListMapper.insertEcardPosterMakeList(ecardPosterMakeList);
    }

    /**
     * 修改自制海报记录
     * 
     * @param ecardPosterMakeList 自制海报记录
     * @return 结果
     */
    @Override
    public int updateEcardPosterMakeList(EcardPosterMakeList ecardPosterMakeList)
    {
        return ecardPosterMakeListMapper.updateEcardPosterMakeList(ecardPosterMakeList);
    }

    /**
     * 批量删除自制海报记录
     * 
     * @param ids 需要删除的自制海报记录主键
     * @return 结果
     */
    @Override
    public int deleteEcardPosterMakeListByIds(String ids)
    {
        return ecardPosterMakeListMapper.deleteEcardPosterMakeListByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除自制海报记录信息
     * 
     * @param id 自制海报记录主键
     * @return 结果
     */
    @Override
    public int deleteEcardPosterMakeListById(Long id)
    {
        return ecardPosterMakeListMapper.deleteEcardPosterMakeListById(id);
    }
}
